Set wshShell = WScript.CreateObject("WScript.Shell") Set wshEnv = WshShell.Environment("User") 'Get the the script's directorySet fso = CreateObject("Scripting.FileSystemObject")cwd = fso.GetParentFolderName(WScript.ScriptFullName) 'Stores it in the %SimcPath% variablewshEnv("SimcPath") = cwd'Update %Path% when necessaryenvPath = wshEnv("Path")If Len(envPath) = 0 Then	wshEnv("Path") = "%SimcPath%"    changed=1ElseIf InStr(envPath, "%SimcPath%") = 0 Then	wshEnv("Path") = envPath & ";%SimcPath%"    changed=1End If'Notify the user about the changesmsg = "%SimcPath% was set to: " & vbNewLine & cwd & vbNewLine & vbNewLineIf changed = 1 Then	msg = msg & "%Path% was changed for this user to:"Else	msg = msg & "%Path% was already up-to-date for this user:"End Ifmsg = msg & vbNewLine & wshEnv("Path")MsgBox msg, vbOkOnly & vbInformation, "Success"